<?

  $name = trim($_REQUEST['entityname']);
  $context = trim($_REQUEST['contextname']);
  $thingL = strtolower($thing);
  $thingDir = $thingL.'s/';
  
  $filename = getDefault($filename, $thingDir.strtolower($name).'.'.$thingL.'.php');
  $classname = getDefault($classname, substr(strtoupper($name), 0, 1).substr($name, 1).$thing);

?><h2>Creating New <?= $thing ?></h2>
<?
  if ($name == '')
  {
    print('ERROR: you have to give it a name!');
  }
  else if (file_exists($filename))
  {
    print('ERROR: there already is a file called "'.$filename.'"!');
  }
  else
  {
    ExecCodeTemplate($thingL, $classname, $filename);
  }

?>